package org.gap.domain;

import java.io.Serializable;

import java.lang.StringBuilder;

import java.util.LinkedHashSet;
import java.util.Set;

import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

import javax.xml.bind.annotation.*;

import javax.persistence.*;

/**
 */

@Entity
@NamedQueries({
		@NamedQuery(name = "findAllPayss", query = "select myPays from Pays myPays"),
		@NamedQuery(name = "findPaysByPppCe", query = "select myPays from Pays myPays where myPays.pppCe = ?1"),
		@NamedQuery(name = "findPaysByPppCpModifiable", query = "select myPays from Pays myPays where myPays.pppCpModifiable = ?1"),
		@NamedQuery(name = "findPaysByPppEtiquetteRib", query = "select myPays from Pays myPays where myPays.pppEtiquetteRib = ?1"),
		@NamedQuery(name = "findPaysByPppEtiquetteRibContaining", query = "select myPays from Pays myPays where myPays.pppEtiquetteRib like ?1"),
		@NamedQuery(name = "findPaysByPppLibelle", query = "select myPays from Pays myPays where myPays.pppLibelle = ?1"),
		@NamedQuery(name = "findPaysByPppLibelleContaining", query = "select myPays from Pays myPays where myPays.pppLibelle like ?1"),
		@NamedQuery(name = "findPaysByPppLibelleRecherche", query = "select myPays from Pays myPays where myPays.pppLibelleRecherche = ?1"),
		@NamedQuery(name = "findPaysByPppLibelleRechercheContaining", query = "select myPays from Pays myPays where myPays.pppLibelleRecherche like ?1"),
		@NamedQuery(name = "findPaysByPppMasqueCle", query = "select myPays from Pays myPays where myPays.pppMasqueCle = ?1"),
		@NamedQuery(name = "findPaysByPppMasqueCleContaining", query = "select myPays from Pays myPays where myPays.pppMasqueCle like ?1"),
		@NamedQuery(name = "findPaysByPppMasqueCodePostal", query = "select myPays from Pays myPays where myPays.pppMasqueCodePostal = ?1"),
		@NamedQuery(name = "findPaysByPppMasqueCodePostalContaining", query = "select myPays from Pays myPays where myPays.pppMasqueCodePostal like ?1"),
		@NamedQuery(name = "findPaysByPppMasqueCompte", query = "select myPays from Pays myPays where myPays.pppMasqueCompte = ?1"),
		@NamedQuery(name = "findPaysByPppMasqueCompteContaining", query = "select myPays from Pays myPays where myPays.pppMasqueCompte like ?1"),
		@NamedQuery(name = "findPaysByPppMasqueEtablissement", query = "select myPays from Pays myPays where myPays.pppMasqueEtablissement = ?1"),
		@NamedQuery(name = "findPaysByPppMasqueEtablissementContaining", query = "select myPays from Pays myPays where myPays.pppMasqueEtablissement like ?1"),
		@NamedQuery(name = "findPaysByPppMasqueGuichet", query = "select myPays from Pays myPays where myPays.pppMasqueGuichet = ?1"),
		@NamedQuery(name = "findPaysByPppMasqueGuichetContaining", query = "select myPays from Pays myPays where myPays.pppMasqueGuichet like ?1"),
		@NamedQuery(name = "findPaysByPppMasquePortable", query = "select myPays from Pays myPays where myPays.pppMasquePortable = ?1"),
		@NamedQuery(name = "findPaysByPppMasquePortableContaining", query = "select myPays from Pays myPays where myPays.pppMasquePortable like ?1"),
		@NamedQuery(name = "findPaysByPppMasqueTelephone", query = "select myPays from Pays myPays where myPays.pppMasqueTelephone = ?1"),
		@NamedQuery(name = "findPaysByPppMasqueTelephoneContaining", query = "select myPays from Pays myPays where myPays.pppMasqueTelephone like ?1"),
		@NamedQuery(name = "findPaysByPppNInsee", query = "select myPays from Pays myPays where myPays.pppNInsee = ?1"),
		@NamedQuery(name = "findPaysByPppNInseeContaining", query = "select myPays from Pays myPays where myPays.pppNInsee like ?1"),
		@NamedQuery(name = "findPaysByPppOrdreDsIban", query = "select myPays from Pays myPays where myPays.pppOrdreDsIban = ?1"),
		@NamedQuery(name = "findPaysByPppOrdreDsIbanContaining", query = "select myPays from Pays myPays where myPays.pppOrdreDsIban like ?1"),
		@NamedQuery(name = "findPaysByPppPays", query = "select myPays from Pays myPays where myPays.pppPays = ?1"),
		@NamedQuery(name = "findPaysByPppPaysContaining", query = "select myPays from Pays myPays where myPays.pppPays like ?1"),
		@NamedQuery(name = "findPaysByPppPrefixeInternational", query = "select myPays from Pays myPays where myPays.pppPrefixeInternational = ?1"),
		@NamedQuery(name = "findPaysByPrimaryKey", query = "select myPays from Pays myPays where myPays.pppPays = ?1") })
@Table(schema = "GAP", name = "PAYS")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(namespace = "GAP_v2/org/gap/domain", name = "Pays")
@XmlRootElement(namespace = "GAP_v2/org/gap/domain")
public class Pays implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 */

	@Column(name = "PPP_PAYS", length = 3, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	@XmlElement
	String pppPays;
	/**
	 */

	@Column(name = "PPP_LIBELLE", length = 50, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String pppLibelle;
	/**
	 */

	@Column(name = "PPP_MASQUE_CODE_POSTAL", length = 12, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String pppMasqueCodePostal;
	/**
	 */

	@Column(name = "PPP_MASQUE_TELEPHONE", length = 20, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String pppMasqueTelephone;
	/**
	 */

	@Column(name = "PPP_PREFIXE_INTERNATIONAL", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Integer pppPrefixeInternational;
	/**
	 */

	@Column(name = "PPP_LIBELLE_RECHERCHE", length = 50, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String pppLibelleRecherche;
	/**
	 */

	@Column(name = "PPP_CP_MODIFIABLE", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Boolean pppCpModifiable;
	/**
	 */

	@Column(name = "PPP_N_INSEE", length = 5, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String pppNInsee;
	/**
	 */

	@Column(name = "PPP_ETIQUETTE_RIB", length = 100, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String pppEtiquetteRib;
	/**
	 */

	@Column(name = "PPP_MASQUE_PORTABLE", length = 20, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String pppMasquePortable;
	/**
	 */

	@Column(name = "PPP_MASQUE_ETABLISSEMENT", length = 30, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String pppMasqueEtablissement;
	/**
	 */

	@Column(name = "PPP_MASQUE_GUICHET", length = 20, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String pppMasqueGuichet;
	/**
	 */

	@Column(name = "PPP_MASQUE_COMPTE", length = 20, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String pppMasqueCompte;
	/**
	 */

	@Column(name = "PPP_MASQUE_CLE", length = 20, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String pppMasqueCle;
	/**
	 */

	@Column(name = "PPP_ORDRE_DS_IBAN", length = 4, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String pppOrdreDsIban;
	/**
	 */

	@Column(name = "PPP_CE", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Boolean pppCe;

	/**
	 */
	@OneToMany(mappedBy = "pays", cascade = { CascadeType.REMOVE }, fetch = FetchType.LAZY)
	@XmlElement(name = "", namespace = "")
	java.util.Set<org.gap.domain.EtablissementsBancaires> etablissementsBancaireses;
	/**
	 */
	@OneToMany(mappedBy = "pays", cascade = { CascadeType.REMOVE }, fetch = FetchType.LAZY)
	@XmlElement(name = "", namespace = "")
	java.util.Set<org.gap.domain.CodesPostaux> codesPostauxes;

	/**
	 */
	public void setPppPays(String pppPays) {
		this.pppPays = pppPays;
	}

	/**
	 */
	public String getPppPays() {
		return this.pppPays;
	}

	/**
	 */
	public void setPppLibelle(String pppLibelle) {
		this.pppLibelle = pppLibelle;
	}

	/**
	 */
	public String getPppLibelle() {
		return this.pppLibelle;
	}

	/**
	 */
	public void setPppMasqueCodePostal(String pppMasqueCodePostal) {
		this.pppMasqueCodePostal = pppMasqueCodePostal;
	}

	/**
	 */
	public String getPppMasqueCodePostal() {
		return this.pppMasqueCodePostal;
	}

	/**
	 */
	public void setPppMasqueTelephone(String pppMasqueTelephone) {
		this.pppMasqueTelephone = pppMasqueTelephone;
	}

	/**
	 */
	public String getPppMasqueTelephone() {
		return this.pppMasqueTelephone;
	}

	/**
	 */
	public void setPppPrefixeInternational(Integer pppPrefixeInternational) {
		this.pppPrefixeInternational = pppPrefixeInternational;
	}

	/**
	 */
	public Integer getPppPrefixeInternational() {
		return this.pppPrefixeInternational;
	}

	/**
	 */
	public void setPppLibelleRecherche(String pppLibelleRecherche) {
		this.pppLibelleRecherche = pppLibelleRecherche;
	}

	/**
	 */
	public String getPppLibelleRecherche() {
		return this.pppLibelleRecherche;
	}

	/**
	 */
	public void setPppCpModifiable(Boolean pppCpModifiable) {
		this.pppCpModifiable = pppCpModifiable;
	}

	/**
	 */
	public Boolean getPppCpModifiable() {
		return this.pppCpModifiable;
	}

	/**
	 */
	public void setPppNInsee(String pppNInsee) {
		this.pppNInsee = pppNInsee;
	}

	/**
	 */
	public String getPppNInsee() {
		return this.pppNInsee;
	}

	/**
	 */
	public void setPppEtiquetteRib(String pppEtiquetteRib) {
		this.pppEtiquetteRib = pppEtiquetteRib;
	}

	/**
	 */
	public String getPppEtiquetteRib() {
		return this.pppEtiquetteRib;
	}

	/**
	 */
	public void setPppMasquePortable(String pppMasquePortable) {
		this.pppMasquePortable = pppMasquePortable;
	}

	/**
	 */
	public String getPppMasquePortable() {
		return this.pppMasquePortable;
	}

	/**
	 */
	public void setPppMasqueEtablissement(String pppMasqueEtablissement) {
		this.pppMasqueEtablissement = pppMasqueEtablissement;
	}

	/**
	 */
	public String getPppMasqueEtablissement() {
		return this.pppMasqueEtablissement;
	}

	/**
	 */
	public void setPppMasqueGuichet(String pppMasqueGuichet) {
		this.pppMasqueGuichet = pppMasqueGuichet;
	}

	/**
	 */
	public String getPppMasqueGuichet() {
		return this.pppMasqueGuichet;
	}

	/**
	 */
	public void setPppMasqueCompte(String pppMasqueCompte) {
		this.pppMasqueCompte = pppMasqueCompte;
	}

	/**
	 */
	public String getPppMasqueCompte() {
		return this.pppMasqueCompte;
	}

	/**
	 */
	public void setPppMasqueCle(String pppMasqueCle) {
		this.pppMasqueCle = pppMasqueCle;
	}

	/**
	 */
	public String getPppMasqueCle() {
		return this.pppMasqueCle;
	}

	/**
	 */
	public void setPppOrdreDsIban(String pppOrdreDsIban) {
		this.pppOrdreDsIban = pppOrdreDsIban;
	}

	/**
	 */
	public String getPppOrdreDsIban() {
		return this.pppOrdreDsIban;
	}

	/**
	 */
	public void setPppCe(Boolean pppCe) {
		this.pppCe = pppCe;
	}

	/**
	 */
	public Boolean getPppCe() {
		return this.pppCe;
	}

	/**
	 */
	public void setEtablissementsBancaireses(Set<EtablissementsBancaires> etablissementsBancaireses) {
		this.etablissementsBancaireses = etablissementsBancaireses;
	}

	/**
	 */
	public Set<EtablissementsBancaires> getEtablissementsBancaireses() {
		if (etablissementsBancaireses == null) {
			etablissementsBancaireses = new java.util.LinkedHashSet<org.gap.domain.EtablissementsBancaires>();
		}
		return etablissementsBancaireses;
	}

	/**
	 */
	public void setCodesPostauxes(Set<CodesPostaux> codesPostauxes) {
		this.codesPostauxes = codesPostauxes;
	}

	/**
	 */
	public Set<CodesPostaux> getCodesPostauxes() {
		if (codesPostauxes == null) {
			codesPostauxes = new java.util.LinkedHashSet<org.gap.domain.CodesPostaux>();
		}
		return codesPostauxes;
	}

	/**
	 */
	public Pays() {
	}

	/**
	 * Copies the contents of the specified bean into this bean.
	 *
	 */
	public void copy(Pays that) {
		setPppPays(that.getPppPays());
		setPppLibelle(that.getPppLibelle());
		setPppMasqueCodePostal(that.getPppMasqueCodePostal());
		setPppMasqueTelephone(that.getPppMasqueTelephone());
		setPppPrefixeInternational(that.getPppPrefixeInternational());
		setPppLibelleRecherche(that.getPppLibelleRecherche());
		setPppCpModifiable(that.getPppCpModifiable());
		setPppNInsee(that.getPppNInsee());
		setPppEtiquetteRib(that.getPppEtiquetteRib());
		setPppMasquePortable(that.getPppMasquePortable());
		setPppMasqueEtablissement(that.getPppMasqueEtablissement());
		setPppMasqueGuichet(that.getPppMasqueGuichet());
		setPppMasqueCompte(that.getPppMasqueCompte());
		setPppMasqueCle(that.getPppMasqueCle());
		setPppOrdreDsIban(that.getPppOrdreDsIban());
		setPppCe(that.getPppCe());
		setEtablissementsBancaireses(new java.util.LinkedHashSet<org.gap.domain.EtablissementsBancaires>(that.getEtablissementsBancaireses()));
		setCodesPostauxes(new java.util.LinkedHashSet<org.gap.domain.CodesPostaux>(that.getCodesPostauxes()));
	}

	/**
	 * Returns a textual representation of a bean.
	 *
	 */
	public String toString() {

		StringBuilder buffer = new StringBuilder();

		buffer.append("pppPays=[").append(pppPays).append("] ");
		buffer.append("pppLibelle=[").append(pppLibelle).append("] ");
		buffer.append("pppMasqueCodePostal=[").append(pppMasqueCodePostal).append("] ");
		buffer.append("pppMasqueTelephone=[").append(pppMasqueTelephone).append("] ");
		buffer.append("pppPrefixeInternational=[").append(pppPrefixeInternational).append("] ");
		buffer.append("pppLibelleRecherche=[").append(pppLibelleRecherche).append("] ");
		buffer.append("pppCpModifiable=[").append(pppCpModifiable).append("] ");
		buffer.append("pppNInsee=[").append(pppNInsee).append("] ");
		buffer.append("pppEtiquetteRib=[").append(pppEtiquetteRib).append("] ");
		buffer.append("pppMasquePortable=[").append(pppMasquePortable).append("] ");
		buffer.append("pppMasqueEtablissement=[").append(pppMasqueEtablissement).append("] ");
		buffer.append("pppMasqueGuichet=[").append(pppMasqueGuichet).append("] ");
		buffer.append("pppMasqueCompte=[").append(pppMasqueCompte).append("] ");
		buffer.append("pppMasqueCle=[").append(pppMasqueCle).append("] ");
		buffer.append("pppOrdreDsIban=[").append(pppOrdreDsIban).append("] ");
		buffer.append("pppCe=[").append(pppCe).append("] ");

		return buffer.toString();
	}

	/**
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = (int) (prime * result + ((pppPays == null) ? 0 : pppPays.hashCode()));
		return result;
	}

	/**
	 */
	public boolean equals(Object obj) {
		if (obj == this)
			return true;
		if (!(obj instanceof Pays))
			return false;
		Pays equalCheck = (Pays) obj;
		if ((pppPays == null && equalCheck.pppPays != null) || (pppPays != null && equalCheck.pppPays == null))
			return false;
		if (pppPays != null && !pppPays.equals(equalCheck.pppPays))
			return false;
		return true;
	}
}
